package arkham.data;

import java.awt.Color;

import arkham.data.Globals.InvestigatorCardType;
import arkham.jaxb.encounter.CardType;

public class Ally extends InvestigatorCard {
	
	public Ally(String name)
	{
		super(name);
	}

	@Override
	public InvestigatorCardType getType() 
	{
		return InvestigatorCardType.ALLY;
	}
	
	@Override
	public boolean isItem()
	{
		return false;
	}
	
	public Color getPreferredColor()
	{
		return new Color(255, 167, 88);
	}
	
	/**
	 * This method creates an ally card from the appropriate XML info
	 * @param xmlcard The XML data
	 * @return The data representation of the object
	 */
	public static Ally createCardFromXml(CardType xmlcard)
	{
		Ally ally = new Ally(xmlcard.getName());
		ally.loadCommonFieldsFromXml(xmlcard);
		
		return ally;
	}
	
}
